package org.example.spring.xmlTx;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * xml方式的事务,是通过aop执行的,需要织入包
 */
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations={"classpath:applicationContext-xmlTx.xml"})
public class SpringTest_xmlTx {
	//注入测试的service
	@Autowired
	private AccountService accountService;
	
	@Test
	public void testTransfer(){
		accountService.transfer("Jack", "Rose", 100d);
	}

}
